﻿package mortal.game.scene3D.display3d.icon3d
{
    import __AS3__.vec.*;
    import baseEngine.basic.*;
    import baseEngine.core.*;
    import baseEngine.system.*;
    import frEngine.manager.*;

    public class Icon3DMesh extends Mesh3D
    {
        private var _curList:Vector.<Number>;
        public var iconBg0:Texture3D;
        public var listArr:Array;
        private var _textureUrl:String;

        public function Icon3DMesh(param1:RenderList)
        {
            this.listArr = new Array();
            if (!param1)
            {
                param1 = Global3D.scene.renderLayerList;
            }
            super("", false, param1);
            return;
        }// end function

        public function reinit(param1:String, param2:RenderList) : void
        {
            this._textureUrl = param1;
            this.name = param1;
            this.iconBg0 = Resource3dManager.instance.getTexture3d(this._textureUrl, 0);
            if (!param2)
            {
                param2 = Global3D.scene.renderLayerList;
            }
            this.renderList = param2;
            Resource3dManager.instance.addStaticResource(this._textureUrl);
            return;
        }// end function

        override public function dispose(param1:Boolean = true) : void
        {
            super.dispose(param1);
            this._curList = null;
            this.listArr = new Array();
            this.iconBg0 = null;
            return;
        }// end function

        public function get vectorList() : Vector.<Number>
        {
            if (!this._curList || this._curList.length >= 400)
            {
                this._curList = new Vector.<Number>;
                this.listArr.push(this._curList);
            }
            return this._curList;
        }// end function

    }
}
